<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/18
 * Time: 8:36
 */
class circle{
    private $r;


    public function __construct($r)
    {
        $this->r=$r;
    }
    public  function __clone()
    {
        $this->r=10;
    }
    public  function __toString()
    {
        return '本圆的半径为:'.$this->r;
    }
    public  function __call($methodname, $args)
    {
        die("你调用的".$methodname."不存在!");
    }

//    public  function getArea(){
//        return 3.14*$this->r*$this->r;
//    }
//    public function  __set($name,$value){
//        if($name=='r' && $value<0){
//            $this->r=0;
//        }
//        else{
//            $this->$name=$value;
//        }
//    }
//    public function __get($name){
//        return $this->$name;
//    }
}
$c=new Circle();
echo $c;
$e=$c->getArea();
print $d;
//var_dump($c);
//var_dump($cc);